package com.ecut.property_project.mapper.character;

import com.ecut.property_project.model.character.Account;
import com.ecut.property_project.model.character.Role;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface AccountMapper {
    public List<Account> selectAll();

    public List<Account> selectByPage(Integer page, Integer pageSize);

    public Account getAccount(String tel);

    //自动注入自增id
    public Boolean register(Account account);

    public Account accountLogin(String tel, String password);

    public List<Role> getAccountRolesById(Integer id);

    //通过用户id和权限名插入user_role表
    public Boolean giveAccountRolesById(Integer id,String name);

    public Boolean updateAccount(Account account);

    public Boolean deleteAccount(Integer id);

    public Boolean saveList(List<Account> list);

}
